
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Document</title>
  
  <link href="<?php echo base_url();?>/public/css/bootstrap.min.css" rel="stylesheet">
  <link href="<?php echo base_url();?>/public/css/bootstrap-theme.min.css" rel="stylesheet">
  <link href="<?php echo base_url();?>/public/css/style.css" rel="stylesheet">

    <script charset="utf-8" src="<?php echo base_url();?>/public/kindeditor/kindeditor-all-min.js"></script>
    <script charset="utf-8" src="<?php echo base_url();?>/public/kindeditor/lang/zh-CN.js"></script>
    <script type="text/javascript" src="<?php echo base_url();?>/public/js/jquery.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url();?>/public/js/jquery.upload.js"></script>
    <script type="text/javascript">
      $(function(){
         $("#article_add").submit(function(){
           if ($("#biaoti").val() =='') {

           alert("标题不能为空！");
               return false;
           }
          if ($('select[name=catalog_id]').val() == 'no') {

            alert("请选择一个分类！");
               return false;
          }; 
        
         })
  })
</script>

</head>

<body>
    <div class="container">
      <div  class="row" >
	      <div class="page-header">
          <h1><?php echo $title  ?>分类</h1>
        </div>
        
        <div class="col-md-9 col-md-offset-1">
          <form method="POST" class="form-horizontal" action="" enctype="multipart/form-data" id="catalog_add" >
            <div class="form-group">
              <label class="col-sm-2 control-label"><b class="error">*</b>名称</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" name="name" value="<?php echo set_value('name',$catalog->name) ?>" >
                <?php echo form_error('name'); ?>
                </div>
            </div>
            
            <div class="form-group">
              <div class="col-md-10 col-md-offset-2">
             <button type="submit" class="btn btn-primary  btn-lg  btn-block">提交</button>
            </div>
           </div>
            
          <div class="form-group">
              <div class="col-md-10 col-md-offset-2">
             <a class="btn btn-primary btn-lg btn-block" href="<?php echo site_url('admin/catalog/index') ?>">返回</a>
            </div>
           </div>
         </form>
         
        </div>


    </div>
  </div> 
 </body>


</html>